#pragma once

#include <fstream>
#include <iostream>
#include <vector>
#include "LCD.h"
#include "agx.h"
#include "battery.h"
#include "chasis.h"
#include "gyroscope.h"
#include "lidar.h"
#include "stereo_camera.h"
#include "student.h"
#include "tire.h"

// 智能小车
class SmartCar {
public:
    Chasis chasis;
    Tire tire;
    AGX agx;
    StereoCamera camera;
    Lidar lidar;
    Gyroscope gyro;
    LCD lcd;
    Battery battery;
    Student stu;

    SmartCar();
    void operator=(const SmartCar& car);
    void setID(std::string id);
    std::string& getID();
    void print();
    void save(std::string dirName);
    int setStudent(Student& stu);

private:
    std::string _id;  //小车id
    std::vector<BaseComponent*> _all_components;
};